package com.jams.goodox.activity.home;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.tencent.smtt.sdk.WebView;
import com.jams.goodox.BaseFragment;
import com.jams.goodox.R;
import com.jams.goodox.SePref;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2017/10/8.
 */

public class GoodPicFragment extends BaseFragment{
    @Bind(R.id.web_view)
    WebView webView;
    private View rootView;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        if (rootView == null)
            rootView = inflater.inflate(R.layout.good_img_fragment, container, false);

        ButterKnife.bind(this, rootView);
        final String id=getArguments().getString("id");
        webView.getSettings().setJavaScriptEnabled(true);

        webView.loadUrl(String.format("http://app.tongmenhui.net/jiubang/product_detail?token=%s&id=%s&detail=1", SePref.getToken(),id));

        return rootView;
    }
}
